home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacPeople 1997 August 15
/
MACPEOPLE-1997-08-15.ISO.7z
/
MACPEOPLE-1997-08-15.ISO
/
アップル関連
/
ARA CO アップデート
/
モデム用
/
MICRO CORE MC288XL⁄XLII⁄XR⁄XE
/
MICRO CORE MC288XL_XLII_XR_XE
next >
Wrap
Text File
|
1996-06-20
|
10KB
|
515 lines
! ARA 2.0 Modem script for MICRO CORE Modem(288)
! Copyright (C) MICRO REASEARCH INSTITUTE Inc. 1994-1996
!
! 'mlts' resource info for this modem:
! byte 1 == 01 -> modem HAS builtin reliability protocols
! byte 2 == 00 -> reserved by Apple
! byte 3 == 21 -> max hex chars in varstr 7 (33 dec)
! byte 4 == 21 -> max hex chars in varstr 8
! byte 5 == 21 -> max hex chars in varstr 9
!
@ORIGINATE
@ANSWER
!
! set up the modem - label range is 1-10
!
! Mac talks to the modem at 57,600 bps.
serreset 9600, 0, 8, 1
matchclr
matchstr 1 13 "OK¥13¥10"
write "AT%N0¥13"
matchread 30
serreset 57600, 0, 8, 1
!
! reset the serial port
HSReset 0 0 0 0 0 0
settries 0
!
@LABEL 1
matchclr
matchstr 1 3 "OK¥13¥10"
! &F - Restore factory configuration
! E0 - Disable command echo
! &D0 - DTR is ignored
! ¥N0 - Select normal speed buffed mode
! S0=0 - Disable auto-answer mode
! S7=60 - To allow for an international call
write "AT&FE0&D0S0=0S7=60¥13"
matchread 30
inctries
iftries 2 91
!
! Reset the Modem
!
!DTRSet
!pause 5
!DTRClear
!pause 5
!DTRSet
pause 5
flush
jump 1
!
@LABEL 3
! Modem responding & configured.
! determine if reliable link is requested.
!
! if modem mnp10 link requested (var 4 == 2) then jump label 4
ifstr 4 4 "2"
!
! if modem v42 link requested (var 4 == 1) then jump label 5
ifstr 4 5 "1"
!
! if no modem v42 link requested (var 4 == 0) [same as ARA 1.0] then jump label 9
ifstr 4 9 "0"
!
! else invalid value in var 4; exit w/error
jump 96
!
@LABEL 4
! yes, MNP10 link is requested. OK for LAP-M -> MNP10.
!matchclr
!matchstr 1 7 "OK¥13¥10"
! -C0 - Enable MNP10 operation
! -K1 - Enable V.42 LAPM to MNP10 conversion
! ¥N3 - V.42 -> MNP4 autoreliable mode
! %C0 - Disable compression
!write "AT-C0-K1¥¥N3%C0¥13"
!matchread 300
!jump 91
!
@LABEL 5
! yes, V.42 link is requested. OK for LAP-M -> MNP -> NORMAL
matchclr
matchstr 1 7 "OK¥13¥10"
! ¥N3 - V.42 -> MNP4 autoreliable mode
! %C0 - Disable compression
write "AT¥¥N3¥13"
matchread 300
jump 91
!
@LABEL 7
! if we DID want v42b in the modem, this is where it would go,
! but since the cpu does a better job at compressing compressable
! files, this setup stuff is commented out. the matchstrings and
! associated labels have been left in.
!matchclr
!matchstr 1 9 "OK¥13¥10"
! ¥N3 - V.42bis -> MNP5 autoreliable mode
!write "AT¥¥N3¥13"
!matchread 300
!jump 91
!
@LABEL 9
! If speaker on flag is true, jump to label 13. Else turn off the speaker.
ifstr 2 13 "1"
pause 5
matchclr
matchstr 1 13 "OK¥13¥10"
write "ATM0¥13"
matchread 30
jump 91
!
! modem ready, so enable answering or originate a call - label range is 11-30
!
@LABEL 13
pause 5
ifANSWER 81
!
! if normal dialing (parm 6 == 0) jump to 19
ifstr 6 19 "0"
!
! if blind dialing (parm 6 == 1) jump to 17
ifstr 6 17 "1"
!
! if manual dialing (parm 6 == 2) jump to 15
ifstr 6 15 "2"
!
! else invalid value in var 6; exit w/error
jump 96
!
@LABEL 15
note "Manual dialing initiated" 3
!note "手動ダイアル中。" 3
! X1 to ignore dialtone & busy for manual dialing, D to dial
write "ATX1D ¥13"
jump 32
!
@LABEL 17
note "Dialing without tone" 3
!note "ダイアルトーンを無視してダイアル中。" 3
matchclr
matchstr 1 19 "OK¥13¥10"
! X1 to ignore dialtone & busy for blind dialing
write "ATX1¥13"
matchread 30
jump 91
!
@LABEL 19
! this is where we break up long dialstrings
!
! parm 1 is always the full dialstring from the conn doc
note "Dialing ^1" 3
!note "^1 をダイアル中。" 3
! parm 3 is always "p" for pulse & "t" for tone
!
! if parm 8 == blank (complete dialstring in parm 7)
! then jump to label 27 & dial parm 7
ifstr 8 27 " "
!
! if parm 9 == blank (complete dialstring in parms 7 & 8)
! then jump to label 24 & dial parm 7 & 8
ifstr 9 24 " "
!
! else dial parm 7 & 8 & 9 (complete dialstring in parms 7, 8 & 9)
matchclr
matchstr 1 21 "OK¥13¥10"
! parm 7 holds first string fragment
write "ATD^3^7;¥13"
matchread 400
! modem not responding; bailout.
jump 91
@LABEL 21
! parm 8 holds second string fragment
matchclr
matchstr 1 22 "OK¥13¥10"
write "ATD^3^8;¥13"
matchread 400
! modem not responding; bailout.
jump 91
@LABEL 22
! parm 9 holds last string fragment
write "ATD^3^9¥13"
jump 32
!
@LABEL 24
matchclr
matchstr 1 25 "OK¥13¥10"
! parm 7 holds first string fragment
write "ATD^3^7;¥13"
matchread 400
! modem not responding; bailout.
jump 91
@LABEL 25
! parm 8 holds last string fragment
write "ATD^3^8¥13"
jump 32
!
@LABEL 27
! parm 7 holds entire string
write "ATD^3^7¥13"
jump 32
!
! connecting - label range is 31-60
!
@LABEL 32
matchclr
matchstr 1 82 "RING¥13¥10"
matchstr 2 92 "NO DIALTONE¥13¥10"
matchstr 3 93 "NO CARRIER¥13¥10"
matchstr 4 93 "ERROR¥13¥10"
matchstr 5 94 "BUSY¥13¥10"
matchstr 6 95 "NO ANSWER¥13¥10"
matchstr 6 34 "CONNECT"
matchread 700
ifANSWER 32
jump 91
!BPS CHECK
@LABEL 34
matchclr
matchstr 1 40 " 1200"
matchstr 2 41 " 2400¥13¥10"
matchstr 3 42 " 2400/"
matchstr 4 43 " 4800"
matchstr 5 44 " 7200"
matchstr 6 45 " 9600"
matchstr 7 46 " 12000"
matchstr 8 47 " 14400"
matchstr 9 48 " 16800"
matchstr 10 49 " 19200"
matchstr 11 50 " 21600"
matchstr 12 51 " 24000"
matchstr 13 52 " 26400"
matchstr 14 53 " 28800"
matchstr 15 54 " 31200"
matchstr 16 55 " 33600"
matchstr 17 35 "/"
matchstr 18 78 "¥13¥10"
matchread 700
jump 91
@LABEL 35
matchclr
matchstr 1 56 "NONE"
matchstr 2 57 "REL"
matchstr 3 58 "MNP¥13¥10"
matchstr 4 59 "MNP/"
matchstr 5 60 "MNP10"
matchstr 6 61 "LAPM"
matchstr 7 36 "/"
matchstr 8 78 "¥13¥10"
matchread 700
jump 91
@LABEL 36
matchclr
matchstr 1 37 "NONE¥13¥10"
matchstr 2 38 "MNP5¥13¥10"
matchstr 3 39 "V.42bis¥13¥10"
matchstr 4 39 "V.42BIS¥13¥10"
matchstr 5 78 "¥13¥10"
matchread 700
jump 91
!Compresion Protocol
@LABEL 37
note "NO Compression." 1
!note "圧縮未使用" 1
jump 78
@LABEL 38
note "MNP5 Compression." 1
!note "MNP 5 圧縮を使用" 1
userhook 3
jump 78
@LABEL 39
note "V.42bis Compression." 1
!note "V.42bis 圧縮を使用" 1
userhook 3
jump 78
!ModemSpeed(DCE) report to A.R.A.
!This CCL support 1200 to 33600bps
@LABEL 40
CommunicatingAt 1200
note "Communicating at 1200 bps." 3
!note "1200 bps で接続中" 3
jump 34
@LABEL 41
CommunicatingAt 2400
note "Communicating at 2400 bps." 3
!note "2400 bps で接続中" 3
jump 78
@LABEL 42
CommunicatingAt 2400
note "Communicating at 2400 bps." 3
!note "2400 bps で接続中" 3
jump 35
@LABEL 43
CommunicatingAt 4800
note "Communicating at 4800 bps." 3
!note "4800 bps で接続中" 3
jump 34
@LABEL 44
CommunicatingAt 7200
note "Communicating at 7200 bps." 3
!note "7200 bps で接続中" 3
jump 34
@LABEL 45
CommunicatingAt 9600
note "Communicating at 9600 bps." 3
!note "9600 bps で接続中" 3
jump 34
@LABEL 46
CommunicatingAt 12000
note "Communicating at 12k bps." 3
!note "12k bps で接続中" 3
jump 34
@LABEL 47
CommunicatingAt 14400
note "Communicating at 14.4k bps." 3
!note "14.4k bps で接続中" 3
jump 34
@LABEL 48
CommunicatingAt 16800
note "Communicating at 16.8k bps." 3
!note "16.8k bps で接続中" 3
jump 34
@LABEL 49
CommunicatingAt 19200
note "Communicating at 19.2k bps." 3
!note "19.2k bps で接続中" 3
jump 34
@LABEL 50
CommunicatingAt 21600
note "Communicating at 21.6k bps." 3
!note "21.6k bps で接続中" 3
jump 34
@LABEL 51
CommunicatingAt 24000
note "Communicating at 24.0k bps." 3
!note "24.0k bps で接続中" 3
jump 34
@LABEL 52
CommunicatingAt 26400
note "Communicating at 26.4k bps." 3
!note "26.4k bps で接続中" 3
jump 34
@LABEL 53
CommunicatingAt 28800
note "Communicating at 28.8k bps." 3
!note "28.8k bps で接続中" 3
jump 34
@LABEL 54
CommunicatingAt 31200
note "Communicating at 31.2k bps." 3
!note "31.2k bps で接続中" 3
jump 34
@LABEL 55
CommunicatingAt 33600
note "Communicating at 33.6k bps." 3
!note "33.6k bps で接続中" 3
jump 34
!Error Collection Protocol
@LABEL 56
note "NO Error Collection." 1
!note "エラー訂正未使用" 1
jump 35
@LABEL 57
note "Reliable Link Established." 1
!note "エラー訂正リンクが成立。" 1
userhook 2
jump 35
@LABEL 58
note "MNP4 Reliable Link Established." 1
!note "MNP 4 リンクが成立。" 1
userhook 2
jump 35
@LABEL 59
note "MNP4 Reliable Link Established." 1
!note "MNP 4 リンクが成立。" 1
userhook 2
jump 36
@LABEL 60
note "MNP10 Reliable Link Established." 1
!note "MNP 10 リンクが成立。" 1
userhook 4
jump 35
@LABEL 61
note "LAPM Reliable Link Established." 1
!note "LAPM リンクが成立。" 1
userhook 4
jump 35
@LABEL 78
! turn on cts handshaking.
HSReset 0 1 0 0 0 0
!
ifANSWER 79
pause 30
@LABEL 79
exit 0
!
!@ANSWER
! Set the modem to answer on 1st ring - label range is 81-90
!
@LABEL 81
matchclr
matchstr 1 32 "OK¥13¥10"
write "ATS0=2¥13"
matchread 30
jump 91
!
@LABEL 82
ifORIGINATE 32
! claim the serial port
userhook 1
note "Answering phone..." 3
!note "電話に応対しています。" 3
jump 32
!
! error messages - label range is 91-100
!
! Modem Not Responding
@LABEL 91
exit -6019
!
! No Dial Tone
@LABEL 92
exit -6020
!
! No Carrier or Error
@LABEL 93
exit -6021
!
! Busy
@LABEL 94
exit -6022
!
! No Answer
@LABEL 95
exit -6023
!
! varstring invalid value
@LABEL 96
exit -6027
!
! Redial error
@LABEL 99
exit -6022
!
! Hang up the modem - label range is 101-120
!
@HANGUP
@LABEL 102
settries 0
serreset 19200, 0, 8, 1
HSReset 0 0 0 0 0 0
@LABEL 105
!
! Try to get control of the modem.
!
!DTRSet
!pause 5
!DTRClear
pause 5
flush
!
@LABEL 108
flush
matchclr
matchstr 1 111 "NO CARRIER¥13¥10"
matchstr 2 111 "OK¥13¥10"
matchstr 3 111 "ERROR¥13¥10"
write "ATH¥13"
matchread 30
inctries
iftries 3 91
!DTRSet
!pause 5
!DTRClear
!pause 5
!DTRSet
pause 5
flush
!
@LABEL 109
matchclr
matchstr 1 115 "OK¥13¥10"
write "+++"
matchread 15
jump 108
!
! recall the factory settings.
!
@LABEL 111
pause 15
matchclr
matchstr 1 114 "OK¥13¥10"
write "AT&F¥13"
matchread 30
jump 91
!
@LABEL 114
exit 0
!
@LABEL 115
pause 50
jump 108
!
! labels 121-128 are reserved for future emergency hacks
!